<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <link href="../../libs/mui.min.css" rel="stylesheet"/>
    <link href="../../libs/app.css" rel="stylesheet"/>
    <link href="../../css/main.css" rel="stylesheet"/>
    <link href="../../css/assess-d.css" rel="stylesheet"/>
</head>

<body>
<div class="head">
    <img class="mui-action-back" src="../../images/all-left.png" alt="">
    <p>优良职业贷</p>
</div>
<div class="content">
    <!--列表-->
    <div class="list">
        <!--工作年限-->
        <div class="mui-table-view">
            <div class="mui-table-view-cell">
                <a href="#showlx">
                    <div class="lx-le">工作年限</div>
                    <div id="info-lx" class="lx-ri payment-yj ">选择</div>
                </a>
            </div>
        </div>
        <div id="showlx" class="showlx mui-popover mui-popover-action mui-popover-bottom">
            <ul class="mui-table-view">
                <li class="mui-table-view-cell popover-bottom">
                    <a href="#">6个月</a>
                </li>
                <li class="mui-table-view-cell popover-bottom">
                    <a href="#">12个月</a>
                </li>
            </ul>
            <ul class="mui-table-view ">
                <li class="mui-table-view-cell popover-bottom-remove">
                    <a href="#showlx">取消</a>
                </li>
            </ul>
        </div>
        <!--税前收入-->
        <div class="mui-table-view">
            <div class="mui-table-view-cell">
                <div class="lx-le">税前收入</div>
                <div class="lx-ri toast">
                    <input class="bd-ri mr2em price" placeholder="单行输入" value="" type="number">
                    <span class="bd-m">万元</span>
                </div>
            </div>
        </div>

        <!--还款期限期-->
        <!--<div id="xl-y" class=" mui-table-view">
            <div class="mui-table-view-cell">
                <a href="#already-pm">
                    <div class="lx-le">还款期限期</div>
                    <div id="payment-y" class="payment lx-ri infoone-qx">选择</div>
                </a>
            </div>
        </div>
        <div id="already-pm" class="payment-y mui-popover mui-popover-action mui-popover-bottom">
            <ul class="mui-table-view">
                <li class="mui-table-view-cell popover-bottom">
                    <a href="#">12期</span>
                    </a>
                </li>
                <li class="mui-table-view-cell popover-bottom">
                    <a href="#">24期</a>
                </li>
                <li class="mui-table-view-cell popover-bottom">
                    <a href="#">36期</a>
                </li>
                <li class="mui-table-view-cell popover-bottom">
                    <a href="#">48期</a>
                </li>
                <li class="mui-table-view-cell popover-bottom">
                    <a href="#">60期</a>
                </li>
            </ul>
            <ul class="mui-table-view">
                <li class="mui-table-view-cell popover-bottom-remove">
                    <a href="#already-pm">取消</a>
                </li>
            </ul>
        </div>-->

    </div>
    <!--按钮-->
    <div class="buttons">
        <!--<div class="add add-button">继续添加</div>-->
        <div class="add add-submit" id="evaluate">提交</div>
    </div>
</div>
<script src="../../libs/mui.min.js"></script>
<script src="../../js/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/url.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/assess-public.js"></script>
<script type="text/javascript">
    $(function () {
//        var hold = plus.webview.currentWebview().hold; todo
//        hold && $.closePages([hold]);
    });

    var params = new ToArr();
    $('#evaluate').on('tap', function () {
        //各参数数组
        var month = params.rechange('.payment-yj', "个月");
        var price = params.rechange('.price');
//				var stage = params.rechange('.infoone-qx', "期");
        //将各参数数组转换成符合格式的请求参数
        var arrObj = {month: month, price: price};//, stage: stage
        var resParam = params.getParams(arrObj);

        var yuan = /^[0-9]+(.[0-9]{1,4})?$/;

        for (var i = 0; i < resParam.length; i++) {
            if ((!yuan.test(price[i])) || price[i] == undefined) {
                mui.toast('请检查您税前总收入...');
                return;
            } else if (month[i] == undefined || month[i] == null) {// || stage[i] == undefined || stage[i] == null || stage[i] == '选择'
                mui.toast('请把信息填充完整...');
                return;
            } else {
                if (i === resParam.length - 1) {
//							plus.nativeUI.showWaiting();
                    params.getAjax("ylzy", resParam)
                }
            }
        }
    });

    //判断是否从申请页过来
    localStorage.isAssess === 'ylzy' ? mui.toast('请您先进行该项评估！') : '';
    localStorage.removeItem('isAssess');
</script>
</body>

</html>